import categories from './categories.js'


const json = {
	categories
}

export default (name, loading = true) => {
	if(loading) {
		uni.showLoading({
		    title: '玩命加载中'
		});
	}
	
	return new Promise(resolve => {
		setTimeout(() => {
			uni.hideLoading() 
			resolve(json[name]) 
		}, 500)
	})
}